package com.xuanyuan.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Departments entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "departments", catalog = "send_message")
public class Departments implements java.io.Serializable {

	// Fields

	private Integer id;
	private Integer departmentsId;
	private String no;
	private String userName;
	private String departmentName;
	private String phoneNumber;

	// Constructors

	/** default constructor */
	public Departments() {
	}

	/** minimal constructor */
	public Departments(Integer departmentsId, String userName,
			String departmentName, String phoneNumber) {
		this.departmentsId = departmentsId;
		this.userName = userName;
		this.departmentName = departmentName;
		this.phoneNumber = phoneNumber;
	}

	/** full constructor */
	public Departments(Integer departmentsId, String no, String userName,
			String departmentName, String phoneNumber) {
		this.departmentsId = departmentsId;
		this.no = no;
		this.userName = userName;
		this.departmentName = departmentName;
		this.phoneNumber = phoneNumber;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "departmentsId", nullable = false)
	public Integer getDepartmentsId() {
		return this.departmentsId;
	}

	public void setDepartmentsId(Integer departmentsId) {
		this.departmentsId = departmentsId;
	}

	@Column(name = "no", length = 4)
	public String getNo() {
		return this.no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	@Column(name = "userName", nullable = false, length = 50)
	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "departmentName", nullable = false, length = 50)
	public String getDepartmentName() {
		return this.departmentName;
	}

	public void setDepartmentName(String departmentName) {
		this.departmentName = departmentName;
	}

	@Column(name = "phoneNumber", nullable = false, length = 11)
	public String getPhoneNumber() {
		return this.phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

}